<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
  <head>
    <th:block th:replace="~{/_include/header}" />
    <title>[[${bundle.L('打印视图')}]]</title>
    <style type="text/css">
      html,
      body {
        background-color: #fff;
      }
      .preview-tools {
        padding: 10px 15px 5px;
        text-align: right;
      }
      .preview-content {
        margin: 0 20px 20px;
      }
      @media print {
        .preview-content {
          margin: 0;
        }
      }
      .table th {
        background-color: #eee !important;
        width: 14%;
      }
      .table th.divider {
        width: 100%;
      }
      .table th,
      .table td {
        vertical-align: top;
        word-break: break-all;
        word-wrap: break-word;
      }
      .table th.divider:empty {
        padding: 0;
      }
      .table td img {
        max-height: 80px;
        max-width: 80px;
      }
      .table td .img-field.barcode .img-thumbnail img {
        max-height: 100%;
        max-width: 100%;
      }
      .table td > p {
        margin: 0;
        line-height: 1.428571;
      }
    </style>
  </head>
  <body>
    <div class="preview-tools d-print-none">
      <button class="btn btn-space btn-primary" onclick="window.print()"><i class="icon zmdi zmdi-print"></i> [[${bundle.L('打印')}]]</button>
      <button class="btn btn-space btn-secondary" onclick="window.close()">[[${bundle.L('关闭')}]]</button>
    </div>
    <div class="preview-content">
      <div id="preview-table"></div>
      <div class="font-italic text-muted hide">[[${printTime}]] &nbsp;·&nbsp; [[${printUser}]]</div>
    </div>
    <th:block th:replace="~{/_include/footer}" />
    <script>
      window.__PageConfig = {
        record: '[[${recordId}]]',
        content: [(${contentBody})],
      }
    </script>
    <script th:src="@{/assets/js/rb-forms.js}" type="text/babel"></script>
    <script th:src="@{/assets/js/rb-forms.append.js}" type="text/babel"></script>
    <script th:src="@{/assets/js/print-preview.js}" type="text/babel"></script>
  </body>
</html>
